package ABC.Z314;

import java.util.ArrayList;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        Company company = new Company();
        company.setName("周谷堆");
        System.out.println("欢迎来到" + company.getName());
        while (true) {
            System.out.println("请选择您需要进行的操作");
            System.out.println("1.员工入职信息录取 2.辞退员工 3.输出员工信息 4.退出");
            int num = in.nextInt();
            while (true) {
                if (num > 0 && num < 4) {
                    break;
                }
                System.out.println("错误，请重新输入");
                num = in.nextInt();
            }
            switch (num) {
                case 1:
                    System.out.println("输入员工信息（姓名/性别/职务/工号/年龄/薪资）");
                    company.add(new Staff(in.next(),in.next(),in.next(),in.next(),in.nextInt(),in.nextDouble()));
                    break;
                case 2:
                    System.out.println("请输入辞退的员工工号");
                    Staff aa=new Staff(in.next());
                    company.citui(aa);
                    break;
                case 3:
                    company.staffshow();
                    System.out.println("员工薪水最高是"+company.salarymax()+"元");
                    break;
            }

        }
    }
}
